<!DOCTYPE html>
<html lang="zh-cmn-Hans" prefix="og: http://ogp.me/ns#" class="han-init">
<head>
  <meta charset="utf-8">
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  <link rel="icon" href="http://upeng.github.io/favicon.ico">
  <title>upeng</title>
  <link rel="stylesheet" href="/css/style.css">
  <link rel="stylesheet" href="/lib/fancybox/jquery.fancybox-1.3.4.css">
  <!--在这里倒入jquery 方便处理部分页面的jquery-->
  <script src="https://cdn.staticfile.org/jquery/1.7/jquery.min.js" type="text/javascript" ></script>
</head>

<body>
	<header class="site-header navfixed-false">
  <div class="container">
      <h1><a href="/" title="upeng"><span class="octicon octicon-mark-github"></span> upeng</a></h1>
      <nav class="site-header-nav" role="navigation">
        
              
              <a href="/"  class=" site-header-nav-item hvr-underline-from-center" title="Home">Home</a>
        
              
              <a href="/categories/"  class=" site-header-nav-item hvr-underline-from-center" title="Categories">Categories</a>
        
              
              <a href="/bookmark/"  class=" site-header-nav-item hvr-underline-from-center" title="Bookmark">Bookmark</a>
        
              
              <a href="http://shareup.sinaapp.com"  class=" site-header-nav-item hvr-underline-from-center" title="Share">Share</a>
        
              
              <a href="/about/"  class=" site-header-nav-item hvr-underline-from-center" title="About">About</a>
        
      </nav>
  </div>
</header>

	
<section class="collection-head geopattern" data-pattern-id="工作中经常使用到的几个命令行linux&amp;php" >
    <div class="container">
        <div class="collection-title">
            <h1 class="collection-header">
                工作中经常使用到的几个命令行linux&amp;php
            </h1>
            
                <div class="collection-info">
                    <span class="meta-info">
                        <span class="octicon octicon-calendar"></span>
                        <time datetime="2016-11-13T04:21:36.000Z" itemprop="datePublished">2016-11-13</time>
                    </span>
                    
                        <span class="meta-info">
                            <span class="octicon octicon-file-directory"></span>
                            <a href='/categories/PHP/' title=''>PHP</a>
                        </span>
                    
                </div>
            
        </div>
    </div>
</section>
	<section class="container">
    <div class="columns">
        <!-- -->
        <div class="column three-fourths">
            <article class="article-content markdown-body">
                <h3 id="nc命令使用方法"><a href="#nc命令使用方法" class="headerlink" title="nc命令使用方法"></a>nc命令使用方法</h3><p>同一局域网（公司内网）下经常会进行文件的传输，使用<code>nc</code>命令非常方便。<br><a id="more"></a><br>A向B发送文件，A端命令<br>A@localhost:~ nc B的ip 约定端口 &lt; 传输文件名<br>B端命令，先处于listen状态<br>B@localhost:~ nc -l 约定端口 &gt; 传输文件名</p>
<p>example</p>
<pre><code>机器A 192.168.1.100
机器B 192.168.1.101

机器A发送文件（test.txt）到机器B
A@localhost:~ nc 192.168.1.101  8888 &lt; test.txt 

机器B监听8888端口（自定义）
B@localhost:~ nc -l 8888 &gt; test.txt
</code></pre><h3 id="php经常使用到的命令行"><a href="#php经常使用到的命令行" class="headerlink" title="php经常使用到的命令行"></a>php经常使用到的命令行</h3><ul>
<li><p>查看php文件是否有语法错误<br><code>php -ln filename.php</code></p>
</li>
<li><p>执行php文件<br><code>php filename.php</code><br><code>php -f filename.php</code></p>
</li>
<li><p>搜索php.ini关键词信息<br><code>php -i | grep keyword</code></p>
</li>
<li><p>查询php.ini位置信息<br><code>php --ini</code></p>
</li>
<li><p>查看php扩展模块<br><code>php -m</code></p>
</li>
</ul>
<blockquote>
<p>上述<code>查询php.ini</code>和<code>检测语法错误</code>很好用，源于查看session配置和运行脚本没有任何输出。</p>
</blockquote>
<p>备注：关于git命令，特别是与远程仓库的交互，待整理和总结</p>

            </article>
            
                <div class="share">
                    <!--开启分享-->
<div class="share-component" data-disabled="google,twitter,facebook" data-description="nc命令使用方法同一局域网（公司内网）下经常会进行文件..."></div>

<script src="/js/share.min.js"></script>

                </div>    
            
            
                
<div class="comments">
	<div class="ds-thread" data-thread-key="php-command" data-title="工作中经常使用到的几个命令行linux&amp;php" data-url="http://upeng.github.io/2016/11/13/php-command/"></div>
	<script type="text/javascript">
	var duoshuoQuery = {short_name:"upeng"};
		(function() {
			var ds = document.createElement('script');
			ds.type = 'text/javascript';ds.async = true;
			ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
			ds.charset = 'UTF-8';
			(document.getElementsByTagName('head')[0]
			 || document.getElementsByTagName('body')[0]).appendChild(ds);
		})();
	</script>
</div>

            
        </div>
        <div class="column one-fourth">
            
                
                


<h3>Post Directory</h3>

<div id="post-directory-module">
	<section class="post-directory">
		<p><strong class="toc-title">文章目录</strong></p>
		<ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#nc命令使用方法"><span class="toc-text">nc命令使用方法</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#php经常使用到的命令行"><span class="toc-text">php经常使用到的命令行</span></a></li></ol>
	</section>
</div>
            
        </div>
    </div>
</section>

<footer class="container">
    <div class="site-footer" role="contentinfo">
        <div class="copyright left mobile-block">
                © 2016
                <span title="yupeng">yupeng</span>
                <a href="javascript:window.scrollTo(0,0)" class="right mobile-visible">TOP</a>
        </div>

        <ul class="site-footer-links right mobile-hidden">
            <li>
                <a href="javascript:window.scrollTo(0,0)" >TOP</a>
            </li>
        </ul>

        <a href="https://github.com/upeng" target="_blank" aria-label="view source code">
            <span class="mega-octicon octicon-mark-github" title="GitHub"></span>
        </a>

        <ul class="site-footer-links mobile-hidden">
            
                  
                  <li>
                    <a href="/"  title="Home">Home</a>
                  </li>
            
                  
                  <li>
                    <a href="/categories/"  title="Categories">Categories</a>
                  </li>
            
                  
                  <li>
                    <a href="/bookmark/"  title="Bookmark">Bookmark</a>
                  </li>
            
                  
                  <li>
                    <a href="http://shareup.sinaapp.com"  title="Share">Share</a>
                  </li>
            
                  
                  <li>
                    <a href="/about/"  title="About">About</a>
                  </li>
            
            <li>
                <a href="/atom.xml">
                    <span class="octicon octicon-rss" style="color:orange;"></span>
                </a>
            </li>
        </ul>
    </div>
</footer>


		<script src="/js/geopattern.js"></script>

		
			<script src="/js/toc.js"></script>
		

		<script src="/js/highlight.pack.js"></script>
		<script src="/lib/fancybox/jquery.fancybox-1.3.4.pack.js"></script>

		<script src="/js/index.js"></script>

		 <script src="/js/popular_repo.js"></script> 

	</body>
</html>